{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Numpy实现基础ML"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "%matplotlib inline\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "设定随机数，并且生成数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7f0784dfbd90>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAeHklEQVR4nO3df5AcZ33n8fdX67W1DqAV9obYawuJOkdcEsNusuX4TlcXLBIEhpIVY066Kic2gdJBUoftBOXWocoHrrqyOKfOvjuS+FQmFxNyoESAT2Bysojs4nBhJyu0trGNQPxI4bUPLbbXgWhRVtL3/phuqbfVPdM90zPT3fN5VW1pdrp35lHv7HeeeZ7v833M3RERkepb0e8GiIhIMRTQRURqQgFdRKQmFNBFRGpCAV1EpCbO6dcTX3jhhb527dp+Pb2ISCUdPHjwh+4+lnSsbwF97dq1zMzM9OvpRUQqycz+Pu2YhlxERGpCAV1EpCYU0EVEakIBXUSkJhTQRURqom9ZLiIig+b+Q3Pcue8wzy0scvHoCDs2rWfL5Hhhj6+ALiLSA/cfmuPWzz7J4tJJAOYWFrn1s08CFBbUKxXQu/3uJiLSLXfuO3w6mIcWl05y577DgxfQe/HuJiLSLc8tLOa6vx2VmRRt9u4mIlJ2F4+O5Lq/HZUJ6L14dxMR6ZYdm9Yz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lITCugiIjWhgC4iUhP/H7bfJ07iOrkMAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "np.random.seed(100)\n",
    "x = np.linspace(-1, 1, 100).reshape(100, 1)\n",
    "y = 3 * np.power(x, 2) + 2 + .2 * np.random.rand(x.size).reshape(100, 1)\n",
    "\n",
    "plt.scatter(x, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "随机初始化权重，假设y = wx + b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "w1 = np.random.rand(1, 1)\n",
    "b1 = np.random.rand(1, 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "定义Loss函数， 我对求导的理解这么差劲了嘛。居然都理解不了符号了\n",
    "$$Loss = \\frac{1}{2} \\sum_{i=1}^{100}{(wx_i^2+b-y_i)^2}$$\n",
    "\n",
    "- $$\\frac{\\delta Loss}{\\delta w}  = \\sum_{i=1}^{100}{(wx_i^2+b-y_i)x_i^2}$$\n",
    "- $$\\frac{\\delta Loss}{\\delta b}  = \\sum_{i=1}^{100}{(wx_i^2+b-y_i)}$$\n",
    "\n",
    "- $$w_i -= lr \\times \\frac{\\delta Loss}{\\delta w}$$\n",
    "- $$b_i -= lr \\times \\frac{\\delta Loss}{\\delta b} $$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "lr = 0.001 # 学习率\n",
    "max_iters = 800\n",
    "for i in range(max_iters):\n",
    "    \n",
    "    y_pred = np.power(x, 2) * w1 + b1   # 定义损失函数\n",
    "    loss = 0.5 * (y_pred - y) ** 2\n",
    "    loss = loss.sum()\n",
    "    \n",
    "    grad_w = np.sum((y_pred - y ) * np.power(x, 2))\n",
    "    grad_b = np.sum((y_pred - y))\n",
    "    \n",
    "    w1 -= lr * grad_w\n",
    "    b1 -= lr * grad_b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x7f0784de53d0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAA2zklEQVR4nO3deXhTVfrA8e/bspTKXhBRoMUNURCQisyIC7ihKDgqAwy4gmwKqCiIOKhIFcUF3EDEH4oUUHHDlXFBHUdQyy4giEhZRCn72gLt+/vjJiVNkzalSbP0/TxPnjb3nty8vUnfnJxz7jmiqhhjjIl+ceEOwBhjTHBYQjfGmBhhCd0YY2KEJXRjjIkRltCNMSZGVAjXE9epU0dTUlLC9fTGGBOVFi5cuE1V6/raF7aEnpKSQkZGRrie3hhjopKIZPrbZ00uxhgTIyyhG2NMjLCEbowxMcISujHGxAhL6MYYEyMsoRtjTBlJT4eUFIiLc36mpwf3+GEbtmiMMeVJejr07QsHDjj3MzOd+wA9ewbnOaKqhh7qTzdjjAmVkSOPJnO3Awec7cESNTX0svh0M8aYUNmwoWTbj0XU1NDL4tPNGGNCpVGjkm0/FlGT0N2fYufzHXO5nKrsLbDdGGMiWVoaJCbCTLrTgxmAcz8tLXjPETUJ3f0plkccl/M53ZlVYLsxxkSynj1h9oiFdOdNkthBcjJMnhzcJuOoSejuT7f5/I3lNKMvk4P+6WaMMaF05cbJUKUKz+/sxfr1we//i5qE3rOn82mWnCy8Ql/OJYO3RyyyDlFjTHTYuxdmzIBu3aBmzZA8RUAJXUTWi8hyEVkiIoXmvBXHcyKyVkSWicg5wQ/VSerr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zBd4HPuYz5cPgays5S6zSUQqADVw3k8BrcoVwrgQkUtxPiQvUtUc93Y/r2kwElSxcanqdo+7U3D6TNyPvdjrsV8HIaaA4vLQHa+pvUN4vgLhL/agnK9ob3L5CThNnBEalXBevDnq9DLMw2m/BrgZCFaNf47reIEct1DbnSupudutrwV89oaHIi4RqeVushCROjiLl6wM9/lyvXbv4bQtzvbaF8zz5fP9UkS8NwBfuc7PHKC7OKNgGgOnAT+WIpYSxSUirYCXgc6qutVju8/XtAzjqu9xtzOwyvX7XOByV3y1gMsp+E01pHG5YjsDp4Nxvse2UJ6vQMwBbnKNdmnL0dXdgnO+QtXbW9ob8A+cdqQc4C9grmv7icAnHuWuAtbgfMKO9Nh+Ms4/3FrgbaBykOJKAr4EfgW+AGq7tqcCUzzKpeB86sZ5Pf4rYDlOYpoOVC2ruIC/u557qetn70g4X0Av4DCwxOPWMhTny9f7BacJp7Pr9wTX37/WdT5O9njsSNfjVgNXBvn9XlxcX7j+D9znZ05xr2kZxfU4sML1/POAMzwee5vrPK4Fbi3LuFz3HwbGej0u1OdrJs4orcM4+as30B/o79ovwIuuuJfjMYIvGOfLLv03xpgYEe1NLsYYY1wsoRtjTIywhG6MMTHCEroxxsQIS+jGGBMjLKEbY0yMsIRujDEx4v8BSRIu0uH8S9MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x, y_pred, 'r-', label=\"predict\")\n",
    "plt.scatter(x, y, color=\"blue\", marker = \"o\", label = \"true\")\n",
    "\n",
    "plt.legend()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## PyTorch LR"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch as t\n",
    "\n",
    "%matplotlib inline\n",
    "from matplotlib import pyplot as plt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAejklEQVR4nO3df5Ac5X3n8fdXyxqNzzELZotIC0JymYOLj0QyW8CdrpwgJ4Zgn9ABPilV5CCHS2fHdoJyR26JqxwfdSnkUBXZKbuO0+FcwKTM+mSsyJZ9OpwV5TMV4Vuh5YcRsmXsBNacWX4sNqe1spK+98d0S63e7pmenZ6Znu7Pq2pLM929PY96Zr/z9PN8n+cxd0dERPrfkl4XQERE8qGALiJSEgroIiIloYAuIlISCugiIiVxRq9e+Nxzz/WVK1f26uVFRPrS/v37X3b34aR9PQvoK1euZHJyslcvLyLSl8zs79L2qclFRKQkFNBFREpCAV1EpCQU0EVESkIBXUSkJHqW5SIiUjU7D0xz955D/Hh2juVDNW6/+mI2rBnJ7fwK6CIiXbDzwDR3PPQUc/PHAZieneOOh54CyC2oq8lFRKQL7t5z6GQwD83NH+fuPYdye42+raF3+tZFRCRPP56da2n7YvRVQA+D+PTsHAaES3N04tZFRCRPy4dqTCcE7+VDtdxeI1OTi5n9yMyeMrMpM1swXt/q/tzMDpvZk2b2rtxKGAjbn8ILEl9nKe9bFxGRPN1+9cXUBgdO21YbHOD2qy/O7TVaqaFf5e4vp+z7TeCi4OcK4L8E/+Ymqf0pLs9bFxGRPIWtB/2Q5XIdcL/XFyjdZ2ZDZrbM3V/M6fyZgnWety4iInnbsGako83CWbNcHPhfZrbfzDYn7B8Bno88fyHYdhoz22xmk2Y2OTMz01JBmwXrvG9dRET6TdaA/i/c/V3Um1Y+YmbvXsyLuft2dx9199Hh4cTpfFMltT9Z8O/IUI27rr9UHaIiUgg7D0yzdusEq8Z2s3brBDsPT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bC9iXou6n8E7uxiuS5092kzezswYWZPUQ9ai5bz9foCcLO7nwg2L/p6lZGZ3QSMAr8a2bzgPXX3HySfIXdfBb7o7kfN7N9Rv7tZ16XXzmITsMPdj0e29fJ6dVRPA7q7/3qbp0hby/QV6rcyZwS1rJbWOG1ULjP7iZktc/cXgwD0UoNT/WvgK+4+Hzl3WFs9amb/HfgP3SyXu08H/z5nZo8Aa6ivF9vT62VmbwV2U/8y3xc596KvV4Isa9+Gx7xgZmcAZ1H/PHVy3dxM5zazX6f+Jfmr7n403J7ynuYRoJqWy91fiTy9l3qfSfi7vxb73UdyKFOmckVsIrb4TgevVxZpZc/levV7k8v/AS6yeobGm6i/ebu83suwl3r7NcDNQF41/l3B+bKcd0HbXRDUwnbrDUBib3gnymVmZ4dNFmZ2LvXlBZ/p9fUK3ruvUG9b3BHbl+f1Svy8NCjvjcBEcH12AZusngWzCrgI+E4bZWmpXGa2BvivwHp3fymyPfE97WK5lkWergcOBo/3AO8Nync28F5Ov1PtaLmCsl1CvYPxbyPbOnm9stgF/Jsg2+VKTq2/nM/16lRvb7s/wL+i3o50FPgJsCfYvhz4euS4a4HvUf+G/Xhk+9up/8EdBv4HcGZO5Xob8DfA94FvAucE20eBeyPHraT+rbsk9vsTwFPUA9MDwFu6VS7gnwev/UTw761FuF7ATcA8MBX5Wd2J65X0eaHehLM+eLw0+P8fDq7H2yO/+/Hg9w4Bv5nz571Zub4Z/B2E12dXs/e0S+W6C/hu8Pp7gUsiv/tvg+t4GPidbpYreP5JYGvs9zp9vb5IPUtrnnr8uhX4EPChYL8BnwvK/RSRDL48rpeG/ouIlES/N7mIiEhAAV1EpCQU0EVESkIBXUSkJBTQRURKQgFdRKQkFNBFREri/wPhUKMdomz8+gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "t.manual_seed(100)\n",
    "dtype = t.float\n",
    "\n",
    "# 生成数据\n",
    "x = t.unsqueeze(t.linspace(-1, 1, 100), dim=1)\n",
    "y = 3 * x.pow(2) + 2 + .2 * t.rand(x.size())\n",
    "\n",
    "plt.scatter(x.numpy(), y.numpy())\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "## 随机初始化参数，w、b需要学习，因此requires_grad=True\n",
    "\n",
    "w = t.randn(1, 1, dtype=dtype, requires_grad=True)\n",
    "b = t.randn(1, 1, dtype=dtype, requires_grad=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "lr = 0.001\n",
    "max_iters = 800\n",
    "for i in range(max_iters):\n",
    "    y_pred = x.pow(2).mm(w) + b\n",
    "    loss = 0.5 * (y_pred - y) ** 2\n",
    "    loss = loss.sum()\n",
    "    \n",
    "    # 自动计算梯度\n",
    "    loss.backward()\n",
    "    \n",
    "    # 手动更新参数，使用 no_grad切断自动求导\n",
    "    with t.no_grad():\n",
    "        w -= lr * w.grad\n",
    "        b -= lr * b.grad\n",
    "        \n",
    "        w.grad.zero_()\n",
    "        b.grad.zero_()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x7f073aac6760>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAA3a0lEQVR4nO3deXhT1dbA4d9qKZQKCBRUxhYQBVFA7FWviApOOMFV8ToUZVAQxAH1gkMdEEW9jiAigiII1BH1E5ArIu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qA+9Mjhw4ECpys2bN08vueSSUpVdt26dtmnTJuD+ynJuiliyRLVNG1XQV2sO1mrs8ep39xwgtQG70pk6VTWlaYHeymjdI4m6u9ZRqh99VPITTVSgmD70EtMWw2bwYFi0KLjHbN8eRo4stkh2djZdu3bllFNOYeHChbRp04bJkydzwgkncPXVVzNnzhyGDh1K3bp1efjhh8nPz6dFixZMnDiRGjVq8PHHHzN48GCSkpI488wzC487adIksrKyePHFF/njjz8YMGAAa9euBWDs2LG88MILrFmzhvbt23P++efz9NNPB/f/XkE80xPr1gU4id15PzKm5j3cuGMkHRM+pef+iSwgrfA5u3fDHXc4V6K6L15yz+AIsdvSLHounfTC0xpu4Nvk/jRc/zF0vchZlOLoo8NbWRMRrMvFj5UrV3LLLbewfPlyatWqVdgVkpyczMKFCznvvPN47LHH+PTTT1m4cCFpaWk899xz7N27l379+jFjxgwWLFjA77//7vf4t99+O2effTaLFy8u/NJ48sknadGiBYsWLarUwdzfhS57qE7fHS9webVZ1Ny/le85nRHcT1XyC5+bl1f0cvVYnlfE/7lU+uqrzN7UhiOXfMmPvV6Ejz6yYG4OCdR0D/UtUrtc1q1bp02aNCl8PHfuXO3evbumpKRodna2qqrOmDFDk5OTtV27dtquXTtt3bq19u3bV3/66Sft1KlT4XM//PDDwi6XiRMn6qBBg1RVtV69erp3794ir1vZu1xKSqkD1bpx23QCfVRBl9FKz2ZeseWjdQZHz+6l5GTn5tnV5HsuW7JS53CuKuhnnKPNWGMpiTGKypS2GAl80wTdj4844gjA+RI8//zzWbRoEYsWLWLZsmVMmDChwusZaUqThri1oDa3Jb3GRcwikb18Tmcy42+gVZ3YyYQJ9EtGPRYLcV8FmsgehvMgP3MSaWQxkJc4l7mso7mlfZoiLKD7sX79er777jsA3njjDa++cIDTTz+db775htWrVwOwa9cuVq1aRatWrcjOzmbNmjUAvPnmm36Pf+655zJ27FgADh48yPbt26lZsyY7duwI1X+pQpQm+LpXQ1qechEnspTRtTK4mrdYvPc47k942qsbJlrnFfE3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zmNbKM9XaQRafzk45ytUo72HewMux+lHygf+AGa7tjcEZnmUuxhYhfMNm+GxvTnOH9xq4F2gWpDqlQzMBX4FPgXquranAa96lEvF+daN83n+Z8DPOIFpKlCjouoFnOF67cWuf2+MhPMF9AT2A4s8bu1Dcb78fV5wunC6ue4nuv7/q13no7nHczNcz1sJXBTkz3tJ9frU9XfgPj/TS3pPK6heTwBLXa8/D2jl8dy+rvO4GuhTkfVyPR4GPOnzvFCfrzdxsrT248SvG4EBwADXfgHGuOr9Mx4ZfME4X3bpvzHGRInK3uVijDHGxQK6McZECQvoxhgTJSygG2NMlLCAbowxUcICujHGRAkL6MYYEyX+H2OI2fCagaEnAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# detach()返回一个新的Variable，从当前计算图中分离下来的，\n",
    "# 但是仍指向原变量的存放位置,不同之处只是requires_grad为false，\n",
    "# 得到的这个Variable永远不需要计算其梯度，不具有grad\n",
    "plt.plot(x.numpy(), y_pred.detach().numpy(), 'r-', label=\"predict\")\n",
    "plt.scatter(x.numpy(), y.numpy(), color=\"blue\", marker = \"o\", label = \"true\")\n",
    "\n",
    "plt.legend()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
